<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'emp_add.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="css/emp_add.css">
<script language="JavaScript" type="text/javascript" src="js/emp_add.js"></script>
>
</head>
<body>
	<h3>修改密码${sessionScope.employee.emp_id}</h3>
	<div id="container">
		<form id="fm-form" method="post"
			action="employeeAction!changePassword.action">
			<fieldset>
			<legend>${sessionScope.employee.emp_name}</legend>
				<div class="fm-req">
					<label for="fm-firstname">原来密码</label> <input type="password"
						name="employee.emp_password" id="fm-firstname" type="text">
						<input type="hidden" name="employee.emp_id" value='${sessionScope.employee.emp_id}' id="fm-firstname" type="text">
				</div>
				<div class="fm-req">
					<label for="new_password">新密码</label> <input type="password"
						name="employee.emp_repassword" id="fm-firstname" type="text">
				</div>
				<div class="fm-req">
					<label for="fm-firstname">再次输入新密码</label> <input name="new_re_password" id="new_re_password" type="password"
						id="fm-firstname" type="text">
				</div>
			</fieldset>
			<div id="fm-submit" class="fm-req">
				<button type="submit" onclick="javascript:return check();"
					class="button" value="注册        ">提交</button>
			</div>
			<br>
		</form>
	</div>
	<script>
	function check() {
		if (document.getElementById("fm-firstname").value == ""||document.getElementById("new_password").value == ""||document.getElementById("new_re_password").value == "") {
			alert("不能为空");
			return false;

		}
		
		if (document.getElementById("new_password").value != document
				.getElementById("new_re_password").value) {
			alert("两次输入密码不同");
			return false;

		}

	}
</script>
</body>
</html>
